program upasCashDrawer0101;
{$I LogOption.txt}

uses
  Classes,
  Forms,
  upasCashDrawer0101main      in 'upasCashDrawer0101main.pas',
  upasserversocashdrawer0101  in 'upasserversocashdrawer0101.pas',
  upasserversocashdrawer      in '..\..\upasserversocashdrawer.pas',
  upasservercocashdrawer      in '..\..\..\upasservercocashdrawer.pas',
  upasCashDrawerGUI           in '..\..\..\upasCashDrawerGUI.pas' {upasCashDrawerForm},
  upasserverco                in '..\..\..\..\upasserverco.pas',
  upasco                      in '..\..\..\..\upasco.pas',
  oposutils                   in '..\..\..\..\..\oposutils.pas',
  upasparam                   in '..\..\..\..\..\upasparam.pas',
  upasxml                     in '..\..\..\..\..\upasxml.pas',
  OposCashDrawer_CCO_TLB      in '..\..\..\..\..\OposCashDrawer_CCO_TLB.pas',
  ParamUtil                   in '..\..\..\..\..\..\common\ParamUtil.pas',
  AuditLog                    in '..\..\..\..\..\..\common\AuditLog.pas',
  INI_Database                in '..\..\..\..\..\..\database\INI_Database.pas',
  INamedDevice                in '..\..\..\..\..\..\industrial\NamedDevice\INamedDevice.pas',
  IPollThread                 in '..\..\..\..\..\..\industrial\IPollThread.pas',
  IIOThread                   in '..\..\..\..\..\..\industrial\IIOThread.pas',
  IOPort                      in '..\..\..\..\..\..\industrial\IOPort.pas',
  idata                       in '..\..\..\..\..\..\industrial\idata.pas',
  IIONamedDeviceThread        in '..\..\..\..\..\..\industrial\NamedDevice\IIONamedDeviceThread.pas',
  IOPortSocket                in '..\..\..\..\..\..\industrial\IOPortSocket.pas',
  INamedDeviceSocketServer    in '..\..\..\..\..\..\industrial\NamedDevice\INamedDeviceSocketServer.pas',
  INamedDeviceServer          in '..\..\..\..\..\..\industrial\NamedDevice\INamedDeviceServer.pas',
  INamedDeviceSocketClient    in '..\..\..\..\..\..\industrial\NamedDevice\INamedDeviceSocketClient.pas',
  INamedDeviceClient          in '..\..\..\..\..\..\industrial\NamedDevice\INamedDeviceClient.pas',
  INI_XCashDrawer             in '..\..\..\..\..\..\pos\device\devdrv\CashDrawer\INI_XCashDrawer.pas',
  INI_NamedDevice             in '..\..\..\..\..\..\posdevice\INI_NamedDevice.pas',
  INI_Property                in '..\..\..\..\..\..\property\INI_Property.pas',
  INI_Section                 in '..\..\..\..\..\..\property\INI_Section.pas',
  blcksock                    in '..\..\..\..\..\..\..\3rd\ararat\source\lib\blcksock.pas',
  synafpc                     in '..\..\..\..\..\..\..\3rd\ararat\source\lib\synafpc.pas',
  synsock                     in '..\..\..\..\..\..\..\3rd\ararat\source\lib\synsock.pas',
  synautil                    in '..\..\..\..\..\..\..\3rd\ararat\source\lib\synautil.pas',
  synacode                    in '..\..\..\..\..\..\..\3rd\ararat\source\lib\synacode.pas',
  synaip                      in '..\..\..\..\..\..\..\3rd\ararat\source\lib\synaip.pas',
  DOM                         in '..\..\..\..\..\..\..\3rd\fpc\fcl-xml\src\dom.pas',
  uriparser                   in '..\..\..\..\..\..\..\3rd\fpc\fcl-base\src\uriparser.pas',
  xmlread                     in '..\..\..\..\..\..\..\3rd\fpc\fcl-xml\src\xmlread.pas',
  xmlutils                    in '..\..\..\..\..\..\..\3rd\fpc\fcl-xml\src\xmlutils.pas',
  Opos                        in '..\..\..\..\..\..\..\OPOS\cco\cco_1_11\Opos.pas',
  OposCash                    in '..\..\..\..\..\..\..\OPOS\cco\cco_1_11\OposCash.pas';

{$R *.res}

var
  tmpS: TStringList;
  ctr: Integer;
begin
  Application.Initialize;
  Application.CreateForm(TupasCashDrawerForm, upasCashDrawerForm);
  upasCashDrawerForm.Emulator := False;

  tmpS := TStringList.Create;
  try
    for ctr := 1 to ParamCount do
      tmpS.Add(ParamStr(ctr));

    upasCashDrawer0101main.initialize(tmpS);

    upasCashDrawer0101main.CashDrawer.OnDirectIOEvent := upasCashDrawerForm.doDirectIOEvent;
    upasCashDrawer0101main.CashDrawer.OnStatusUpdateEvent := upasCashDrawerForm.doStatusUpdateEvent;
  finally
    tmpS.Free;
  end;

  Application.Run;
  upasCashDrawer0101main.finalize;
end.
